Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d07909ee81
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
src/pages/sdk/typescript/client/Method.tempo.session-manager.mdx
Outdated
Show resolved
Hide resolved
| ## WebSocket alternative | ||
|
|
||
| The examples above use Server-Sent Events (SSE) for streaming. If your use case benefits from a persistent bidirectional connection — for example, interactive chat or real-time sessions — you can stream over WebSocket instead. The session payment flow is the same (channel open, voucher signing, close), but vouchers and content travel over a single socket rather than separate HTTP requests. | ||
|
|
||
| On the server, use [`tempo.Ws.serve()`](/sdk/typescript/server/Ws.serve) to bridge a WebSocket to the session payment flow. On the client, use [`session.ws()`](/sdk/typescript/client/Method.tempo.session-manager#sessionwsinput-init) instead of `session.sse()`. | ||
|
|
There was a problem hiding this comment.
maybe :::note would be better for this
client/Method.tempo.session-manager.mdx--session.open()docs now mentionws()alongsidefetch()andsse()as calls that satisfy the 402 probe prerequisite.server/Method.tempo.session.mdx-- addedtempo.Ws.serveto the related section with a short description and link to the fullWs.servepage.guides/streamed-payments.mdx-- added a "WebSocket alternative" section at the bottom pointing readers totempo.Ws.serve()andsession.ws()for bidirectional streaming use cases.